package com.tbs.parkingsaleapp.SystemManager;

public final class NetWorkSetting {
    public static String BasicUrl="http://192.168.1.9:25550/";
    public static String RegisterUrl(String id,String username,String password,String phone,String token)
    {
        return  String.format("%sRegister?id=%s&username=%s&password=%s&phone=%s&token=%s",BasicUrl,id,username,password,phone,token);
    }
    public  static  String FaceCheckUrl()
    {
        return  String.format("%sFaceCheck",BasicUrl);
    }
    public  static String ADUrl(int n)
    {
        return  String.format("%sRequestAD?num=%d",BasicUrl,n);
    }
    public static String FaceLoginUrl(String id,String face)
    {
        return  String.format("%sFaceLogin?id=%s&facestr=%s",BasicUrl,id,face);
    }
    public static  String CommonLoginUrl(String username,String password)
    {
        return  String.format("%sLogin?username=%s&password=%s",BasicUrl,username,password);
    }
    public static String UpdateLikeUrl(String id,String k)
    {
        return  String.format("%sUpdateUserTrait?id=%s&t=%s",BasicUrl,id,k);
    }
    public static String FindParksUrl(int id)
    {
        return String.format("%sFindParks?id=%d",BasicUrl,id);
    }

    public  static  String LocationInfoUrl()
    {
        return String.format("%sAllLocations",BasicUrl);
    }

    public static String PutOrderUrl(String id,int location,int park)
    {
        return String.format("%sPutOrder?buyer=%s&address=%d&park=%d",BasicUrl,id,location,park);
    }
    public static String FindAllOrderUrl(String id)
    {
        return String.format("%sFindOrder?id=%s",BasicUrl,id);
    }

    public static String UpdateUserDataUrl(String id)
    {
        return String.format("%sUserDataUpdate?id=%s",BasicUrl,id);
    }

    public static String ReplyMessageUrl(int id)
    {
        return String.format("%sReplyMessage?id=%d",BasicUrl,id);
    }

    public static String GetMessagesUrl(String id)
    {
        return String.format("%sRequestMessages?id=%s",BasicUrl,id);
    }

    public static String PayUrl(int id)
    {
        return String.format("%sPay?id=%d",BasicUrl,id);
    }
    public static String CancelOrder(int order)
    {
        return String.format("%sCancelOrder?order=%d",BasicUrl,order);
    }
    public  static String getDiscountUrl(int order)
    {
        return String.format("%sUseableDiscount?order=%d",BasicUrl,order);
    }
    public static String useDiscountsUrl(int order,int apply)
    {
       return String.format("%sUseDiscount?order=%d&comfirm=%d",BasicUrl,order,apply);
    }

}
